using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class IphoneUnRegRequest : GeneratedMessageLite<IphoneUnRegRequest, IphoneUnRegRequest.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<IphoneUnRegRequest, IphoneUnRegRequest.Builder>
		{
			private bool resultIsReadOnly;
			private IphoneUnRegRequest result;
			protected override IphoneUnRegRequest.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override IphoneUnRegRequest MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override IphoneUnRegRequest DefaultInstanceForType
			{
				get
				{
					return IphoneUnRegRequest.DefaultInstance;
				}
			}
			public BaseRequest BaseRequest
			{
				get
				{
					return this.result.BaseRequest;
				}
				set
				{
					this.SetBaseRequest(value);
				}
			}
			public string Token
			{
				get
				{
					return this.result.Token;
				}
				set
				{
					this.SetToken(value);
				}
			}
			public Builder()
			{
				this.result = IphoneUnRegRequest.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(IphoneUnRegRequest cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private IphoneUnRegRequest PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					IphoneUnRegRequest other = this.result;
					this.result = new IphoneUnRegRequest();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override IphoneUnRegRequest.Builder Clear()
			{
				this.result = IphoneUnRegRequest.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override IphoneUnRegRequest.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new IphoneUnRegRequest.Builder(this.result);
				}
				return new IphoneUnRegRequest.Builder().MergeFrom(this.result);
			}
			public override IphoneUnRegRequest BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override IphoneUnRegRequest.Builder MergeFrom(IMessageLite other)
			{
				if (other is IphoneUnRegRequest)
				{
					return this.MergeFrom((IphoneUnRegRequest)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override IphoneUnRegRequest.Builder MergeFrom(IphoneUnRegRequest other)
			{
				return this;
			}
			public override IphoneUnRegRequest.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override IphoneUnRegRequest.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(IphoneUnRegRequest._iphoneUnRegRequestFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = IphoneUnRegRequest._iphoneUnRegRequestFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 18u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasToken = input.ReadString(ref this.result.token_);
						}
					}
					else
					{
						BaseRequest.Builder builder = BaseRequest.CreateBuilder();
						if (this.result.hasBaseRequest)
						{
							builder.MergeFrom(this.BaseRequest);
						}
						input.ReadMessage(builder, extensionRegistry);
						this.BaseRequest = builder.BuildPartial();
					}
				}
				return this;
			}
			public IphoneUnRegRequest.Builder SetBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = value;
				return this;
			}
			public IphoneUnRegRequest.Builder SetBaseRequest(BaseRequest.Builder builderForValue)
			{
				ThrowHelper.ThrowIfNull(builderForValue, "builderForValue");
				this.PrepareBuilder();
				this.result.hasBaseRequest = true;
				this.result.baseRequest_ = builderForValue.Build();
				return this;
			}
			public IphoneUnRegRequest.Builder MergeBaseRequest(BaseRequest value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				if (this.result.hasBaseRequest && this.result.baseRequest_ != BaseRequest.DefaultInstance)
				{
					this.result.baseRequest_ = BaseRequest.CreateBuilder(this.result.baseRequest_).MergeFrom(value).BuildPartial();
				}
				else
				{
					this.result.baseRequest_ = value;
				}
				this.result.hasBaseRequest = true;
				return this;
			}
			public IphoneUnRegRequest.Builder ClearBaseRequest()
			{
				this.PrepareBuilder();
				this.result.hasBaseRequest = false;
				this.result.baseRequest_ = null;
				return this;
			}
			public IphoneUnRegRequest.Builder SetToken(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasToken = true;
				this.result.token_ = value;
				return this;
			}
			public IphoneUnRegRequest.Builder ClearToken()
			{
				this.PrepareBuilder();
				this.result.hasToken = false;
				this.result.token_ = "";
				return this;
			}
		}
		public const int BaseRequestFieldNumber = 1;
		public const int TokenFieldNumber = 2;
		private static readonly IphoneUnRegRequest defaultInstance;
		private static readonly string[] _iphoneUnRegRequestFieldNames;
		private static readonly uint[] _iphoneUnRegRequestFieldTags;
		private bool hasBaseRequest;
		private BaseRequest baseRequest_;
		private bool hasToken;
		private string token_ = "";
		private int memoizedSerializedSize = -1;
		public static IphoneUnRegRequest DefaultInstance
		{
			get
			{
				return IphoneUnRegRequest.defaultInstance;
			}
		}
		public override IphoneUnRegRequest DefaultInstanceForType
		{
			get
			{
				return IphoneUnRegRequest.DefaultInstance;
			}
		}
		protected override IphoneUnRegRequest ThisMessage
		{
			get
			{
				return this;
			}
		}
		public BaseRequest BaseRequest
		{
			get
			{
				return this.baseRequest_ ?? BaseRequest.DefaultInstance;
			}
		}
		public string Token
		{
			get
			{
				return this.token_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasBaseRequest && this.BaseRequest.IsInitialized;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasBaseRequest)
				{
					num += CodedOutputStream.ComputeMessageSize(1, this.BaseRequest);
				}
				if (this.hasToken)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.Token);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private IphoneUnRegRequest()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] iphoneUnRegRequestFieldNames = IphoneUnRegRequest._iphoneUnRegRequestFieldNames;
			if (this.hasBaseRequest)
			{
				output.WriteMessage(1, iphoneUnRegRequestFieldNames[0], this.BaseRequest);
			}
			if (this.hasToken)
			{
				output.WriteString(2, iphoneUnRegRequestFieldNames[1], this.Token);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasBaseRequest)
			{
				num ^= this.baseRequest_.GetHashCode();
			}
			if (this.hasToken)
			{
				num ^= this.token_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			IphoneUnRegRequest iphoneUnRegRequest = value as IphoneUnRegRequest;
			return iphoneUnRegRequest != null && (this.hasBaseRequest == iphoneUnRegRequest.hasBaseRequest && (!this.hasBaseRequest || this.baseRequest_.Equals(iphoneUnRegRequest.baseRequest_))) && (this.hasToken == iphoneUnRegRequest.hasToken && (!this.hasToken || this.token_.Equals(iphoneUnRegRequest.token_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<IphoneUnRegRequest, IphoneUnRegRequest.Builder>.PrintField("BaseRequest", this.hasBaseRequest, this.baseRequest_, writer);
			GeneratedMessageLite<IphoneUnRegRequest, IphoneUnRegRequest.Builder>.PrintField("Token", this.hasToken, this.token_, writer);
		}
		public static IphoneUnRegRequest ParseFrom(byte[] data)
		{
			return IphoneUnRegRequest.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private IphoneUnRegRequest MakeReadOnly()
		{
			return this;
		}
		public static IphoneUnRegRequest.Builder CreateBuilder()
		{
			return new IphoneUnRegRequest.Builder();
		}
		public override IphoneUnRegRequest.Builder ToBuilder()
		{
			return IphoneUnRegRequest.CreateBuilder(this);
		}
		public override IphoneUnRegRequest.Builder CreateBuilderForType()
		{
			return new IphoneUnRegRequest.Builder();
		}
		public static IphoneUnRegRequest.Builder CreateBuilder(IphoneUnRegRequest prototype)
		{
			return new IphoneUnRegRequest.Builder(prototype);
		}
		static IphoneUnRegRequest()
		{
			IphoneUnRegRequest.defaultInstance = new IphoneUnRegRequest().MakeReadOnly();
			IphoneUnRegRequest._iphoneUnRegRequestFieldNames = new string[]
			{
				"BaseRequest",
				"Token"
			};
			IphoneUnRegRequest._iphoneUnRegRequestFieldTags = new uint[]
			{
				10u,
				18u
			};
			object.ReferenceEquals(micromsg.Proto.IphoneUnRegRequest.Descriptor, null);
		}
	}
}
